n=int(input())
sum=0

for i in range(n+1):
    if i==0:
        sum=sum
    elif i%2!=0:
        sum+=i/(1+(i-1)*2)
    elif i%2==0:
        sum-=i/(1+(i-1)*2)

print(f"{sum:.3f}")